<template>
  <div class="custom-scrollbar" :style="{ height }">
    <slot></slot>
  </div>
</template>

<script setup lang="ts">
interface Props {
  height: string;
}
defineProps<Props>();
</script>

<style scoped>
.custom-scrollbar {
  height: v-bind(height);
  overflow-y: auto;
  width: 100%;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 0; /* 彻底隐藏垂直滚动条的宽度 */
  height: 0; /* 彻底隐藏水平滚动条的高度 */
  display: none; /* 额外的保险，确保隐藏 */
}

.custom-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
</style>
